// import { DECREMENT, INCREMENT, INCREMENT_ASYNC } from "../const.js/counter.const"
//
// export const increment = payload => ({ type: INCREMENT, payload })
// export const decrement = payload => ({ type: DECREMENT, payload })
//
// // redux-thunk-------
// // export const increment_async = payload => dispatch => {
// //   setTimeout(() => {
// //     dispatch(increment(payload))
// //   }, 2000)
// // }
//
// // export const decrement_async = payload => dispatch => {
// //   setTimeout(() => {
// //     dispatch(decrement(payload))
// //   }, 2000)
// // }
//
// // redux-saga
// export const increment_async = payload => ({ type: INCREMENT_ASYNC, payload })


// redux-actions 案例

import { createAction } from 'redux-actions'

export const increment = createAction('increment')
export const decrement = createAction('decrement')